package com.sxhalo.fsms.mapper;

import com.sxhalo.fsms.domain.*;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface DeviceEmRunningDataMapper {
    int deleteByPrimaryKey(DeviceEmRunningDataKey key);

    int insert(DeviceEmRunningData record);

    int insertSelective(DeviceEmRunningData record);

    DeviceEmRunningData selectByPrimaryKey(DeviceEmRunningDataKey key);

    int updateByPrimaryKeySelective(DeviceEmRunningData record);

    int updateByPrimaryKey(DeviceEmRunningData record);

    List<HashMap> findAttrHis(@Param("attr")String  attr, @Param("where")String   where);
    int batchInsert(@Param("list") List<RedisData> list);
    //曲线图标
    List<Map<String,Object>> getEnergyPhaseHis(@Param("where")String where);

    Map<String,Object>  getLastData(@Param("areaList")List<FactArea> areaList, @Param("where")String where);
    Map<String,Object>  getLastData1(@Param("deviceList")List<FactDevice> deviceList, @Param("where")String where);


    //报表数据
    List<Map<String,Object>>  getEnergyReport(@Param("areaList")List<FactArea> areaList, @Param("where")String where, @Param("where1")String where1, @Param("type")String type);


    //报表数据
    List<Map<String,Object>>  getEnergyReport1(@Param("deviceList")List<FactDevice> deviceList, @Param("where")String where, @Param("where1")String where1, @Param("type")String type);

    int getCount(@Param("where")String where);

    List<DeviceEmRunningData> findWhereList(@Param("where")String where, @Param("order")String order);

    List<DeviceEmRunningData> findPagerList(@Param("start")Integer start, @Param("length")Integer length, @Param("where")String where, @Param("order")String order);

    //报表数据
    List<Map<String,Object>>  getUnitEnergyReport(@Param("where")String where, @Param("where1")String where1);


}